package com.mxx.common.generator;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
public class GlobalNameConfig {

    private List<String> removeClassNamePrefix = new ArrayList<>();
    private List<String> removeFieldNamePrefix = new ArrayList<>();
    private List<String> removeClassNameSuffix = new ArrayList<>();
    private List<String> removeFieldNameSuffix = new ArrayList<>();

    private String entityPackage;

    private String addClassNamePrefix = null;
    private String addFieldNamePrefix = null;
    private String addClassNameSuffix = null;
    private String addFieldNameSuffix = null;


    public GlobalNameConfig setClassNamePrefix(String prefix) {
        this.addClassNamePrefix = prefix;
        return this;
    }

    public GlobalNameConfig setFieldNamePrefix(String prefix) {
        this.addFieldNamePrefix = prefix;
        return this;
    }

    public GlobalNameConfig setClassNameSuffix(String suffix) {
        this.addClassNameSuffix = suffix;
        return this;
    }

    public GlobalNameConfig setFieldNameSuffix(String suffix) {
        this.addFieldNameSuffix = suffix;
        return this;
    }

    public GlobalNameConfig removeClassNamePrefix(String prefix) {
        this.removeClassNamePrefix.add(prefix);
        return this;
    }

    public GlobalNameConfig removeFieldNamePrefix(String prefix) {
        this.removeFieldNamePrefix.add(prefix);
        return this;
    }

    public GlobalNameConfig removeClassNameSuffix(String suffix) {
        this.removeClassNameSuffix.add(suffix);
        return this;
    }

    public GlobalNameConfig removeFieldNameSuffix(String suffix) {
        this.removeFieldNameSuffix.add(suffix);
        return this;
    }

    public GlobalNameConfig setEntityPackage(String entityPackage) {
        this.entityPackage = entityPackage;
        return this;
    }

    public String getEntityPackage() {
        return entityPackage;
    }
}
